define("vKShareButton",["react","lodash","core","santaProps","utils","socialCommon"],function(a,b,c,d,e,f){"use strict";var g=c.compMixins;var h={Button:{w:100,h:21},ButtonWithoutCounter:{w:64,h:21},Link:{w:50,h:21},LinkWithoutIcon:{w:30,h:21},Icon:{w:36,h:36}};var i=h.Button;var j=function(a,b){var c=a.compData;var d={id:a.id,url:b,style:c.style,text:c.text||"Share"};return a.santaBase+"/static/external/VKShare.html?"+e.urlUtils.toQueryString(d)};var k=function(a,b){var c=h[b]||i;return{width:a||c.w,height:c.h}};function l(a,c,d){return{allowTransparency:"true",key:"VKShareButton-"+a.currentUrlPageId,frameBorder:"0",src:j(a,d),scrolling:"no",style:b.clone(c)}}return{displayName:"VKShareButton",mixins:[g.skinBasedComp,f.socialCompMixin],statics:{useSantaTypes:true},propTypes:{compData:d.Types.Component.compData.isRequired,id:d.Types.Component.id.isRequired,santaBase:d.Types.santaBase.isRequired,currentUrlPageId:d.Types.currentUrlPageId.isRequired,registerToPostMessage:d.Types.VK.registerToPostMessage.isRequired,unRegisterToPostMessage:d.Types.VK.unRegisterToPostMessage.isRequired},onVKPostMessage:function(a){this.setState({widthFromVK:a.width})},getInitialState:function(){return{}},componentDidMount:function(){this.props.registerToPostMessage(this)},componentWillUnmount:function(){this.props.unRegisterToPostMessage(this)},getSkinProperties:function(){var b=k(this.state.widthFromVK,this.props.compData.style);var c=this.getSocialUrl();var d=l(this.props,b,c);return{"":{style:b},iframe:a.DOM.iframe(d)}}}});